#include <iostream>

using namespace std;

//指针所占用的内存大小
//在32位操作系统下，指针是占4个字节空间大小
//在64位操作系统下，指针是占8个字节空间大小
int main() {
    cout << "short类型指针占用" << sizeof(short *) << endl;
    cout << "int类型指针占用" << sizeof(int *) << endl;
    cout << "long类型指针占用" << sizeof(long *) << endl;
    cout << "long long类型指针占用" << sizeof(long long *) << endl;
    cout << "char类型指针占用" << sizeof(char *) << endl;
    cout << "float类型指针占用" << sizeof(float *) << endl;
    cout << "double类型指针占用" << sizeof(double *) << endl;
    return 0;
}
